home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Prog / D-G / FKeys.sit / FKeys ƒ / InvisiLayer.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-15  |  856 b   |  44 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.     InvisiLayer FKey #0  --  Version 1.00  --  Sep 15, 1989
  4.     
  5.     Copyright (c) 1989 by Neal E. Trautman
  6.     
  7.     'ShareWare' -- Please send $3 contribution to:
  8.         Neal Trautman
  9.         1701 S.W. 42nd Street
  10.         Fargo, ND  58103
  11.     
  12.     This FKey makes the content region of all windows transparent.
  13.         (If the front window is already transparent, the content regions return)
  14. */
  15.  
  16. main()
  17. {
  18.     register WindowPeek    win;
  19.     register RgnHandle    oldContent;
  20.     
  21.     win = (WindowPeek)FrontWindow();
  22.     while (win)
  23.         {
  24.         if (win->visible)
  25.             {
  26.             oldContent = win->contRgn;
  27.             if (EmptyRgn(oldContent))
  28.                 {
  29.                 ShowHide(win,FALSE);
  30.                 ShowHide(win,TRUE);
  31.                 }
  32.             else
  33.                 {
  34.                 win->contRgn = NewRgn();
  35.                 DiffRgn(win->strucRgn,oldContent,win->strucRgn);
  36.                 CalcVisBehind(win,oldContent);
  37.                 PaintBehind(win,oldContent);
  38.                 DisposeRgn(oldContent);
  39.                 }
  40.             }
  41.         win = win->nextWindow;
  42.         }
  43. }
  44.